package com.ziyueyuwen.xiniao.proxy;

/**
 * Created by jun on 2017/12/16.
 */
public class HumenStaticProxy implements Humen {
    private Humen humen;

    public HumenStaticProxy() {
        humen = new HumenImpl();
    }

    @Override
    public void eat(String food) {
        before();
        humen.eat(food);
        after();
    }

    private void before(){
        System.err.println("Cook: Yes");
    }

    private void after() {
        System.err.println("Clean: Yes");
    }
}
